const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  token: state => state.user.token,
  avatar: state => state.user.avatar,
  name: state => state.user.name,
  // 获取src/store/menu.js里的state中定义的routers，
  // 如此在别的js中使用store.getters.routers就可以调用它
  routers: state => state.menu.routers,
  visitedViews: state => state.tagsView.visitedViews,
  cachedViews: state => state.tagsView.cachedViews

}
export default getters
